package klasy.powtorka;

public class Stringi {

	public static void main(String[] args) {

		String greeting = "Hello";
		System.out.println(greeting);
		System.out.println(greeting.substring(0, 3));
		greeting = greeting.substring(0, 3) + "p!";
		System.out.println(greeting);
		
		System.out.println("Hello".equals(greeting));
		System.out.println("Help!".equals(greeting));
		System.out.println("help!".equals(greeting));
		System.out.println("help!".equalsIgnoreCase(greeting));
		System.out.println("Help!" == greeting);
		
		String s = "Agatka";
		if(s == "Agatka")
			System.out.println("ten sam String");
	}

}
